package org.jeecg.modules.demo.yhs.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.yhs.POJO.Count;

@Mapper
public interface ProportionMapper {
    @Select("SELECT SUM(money) AS money,COUNT(*) AS num  FROM history")
    Count find();

    @Select("SELECT SUM(money) AS money,COUNT(*) AS num  FROM history,vip WHERE history.`vipid`=vip.`vipid` AND vip.`sex`=#{s}")
    Count findBySex(String s);
}
